#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_add_clicked()
{
    const QString &str = ui->lineEdit->text();

    QTreeWidgetItem *item = new QTreeWidgetItem();

    item->setText(0, str);
    ui->treeWidget->addTopLevelItem(item);
}
